#ifndef ISEARCH_H
#define ISEARCH_H

#include <climits>
#if __linux
#include <pcre.h>
#include <pthread.h>
#endif

#include "gt_option.h"

struct entry_t;
struct result_t {
  entry_t *entries;
  entry_t *start;
  int nbentry;
};

struct option_t;
struct search_t {
  result_t *result;
  // thread
  pthread_mutex_t data_mutex;
  int status;
  option_t *option;
};

search_t *create_search(option_t *option);
void do_search(search_t *search);
void free_search(search_t *search);

#endif // header file protect
       // ok